package com.baitiaojun.video.feign;

import com.baitiaojun.api.domain.moments.UserMomentsStatus;
import com.baitiaojun.api.exception.ConditionException;
import com.baitiaojun.api.vo.JsonRes;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @类名 MomentsFeign
 * @描述 TODO
 * @作者 白条君
 * @创建日期 2023/1/18 01:41
 * @版本 1.0
 */
@FeignClient(name = "imooc-bilibili-moments", path = "/moments")
public interface MomentsFeign {

    @PostMapping("/publish-video-moments")
    void publishMoments(@RequestParam("videoId") Long videoId, @RequestParam("userId") Long userId);

    @GetMapping("/search-video-moments-videoIds")
    List<Long> getVideoMomentsVideoIds();

    @PostMapping("/save-moments-status")
    JsonRes addMomentsStatus(@RequestBody UserMomentsStatus momentsStatus) throws ConditionException;
}